<?php
    include 'PHPExcel/IOFactory.php';
    date_default_timezone_set('PRC');
    $file="../Files/".$_SESSION['t_num']."/namelist/".$_FILES['name_list']['name'];
    try{
        $file_type=PHPExcel_IOFactory::identify($file);
        $objReader=PHPExcel_IOFactory::createReader($file_type);
        $objPHPExcel=$objReader->load($file);

    }catch (Exception $e){
        die("error".$e);
    }
    $sheet=$objPHPExcel->getSheet(0);
    $highestRow=$sheet->getHighestRow();
    $highestCol=$sheet->getHighestColumn();
    $class_num_array=array();
    $class_name_array=array();
    for ($col='A';$col<=$highestCol;$col++){
        for($row=2;$row<=$highestRow;$row++){
            if($col=='A'){
                array_push($class_num_array,$sheet->getCell($col.$row)->getValue());
            }
            if($col=='B'){
                array_push($class_name_array,$sheet->getCell($col.$row)->getValue());
            }
        }
    }
